#include "bdd.h"

void
update_ident_row (row * r, char *nid)
{
  uint len = strlen (nid);
  r->ident = realloc (r->ident, len + 1);
  r->hash = chksum_crc32 (nid, len);
  strcpy (r->ident, nid);
}

void
update_val_row (row * r, char *nval)
{
  r->val = realloc (r->val, strlen (nval) + 1);
  strcpy (r->val, nval);
}

void
update_ident_subbase (subbase * s, char *nid)
{
  uint len = strlen (nid);
  s->ident = realloc (s->ident, len + 1);
  s->hash = chksum_crc32 (nid, len);
  strcpy (s->ident, nid);
}
